<html>
    <head>
        <meta charset="UTF-8" />
        <link media="screen" href="/style/main.css" type="text/css" rel="stylesheet" />
        <link type="text/css" href="/css/ui-lightness/jquery-ui-1.8.custom.css" rel="stylesheet" /> 
        <!--[if IE]>
        <link rel="stylesheet" type="text/css" href="/style/ie.css" media="screen" />
        <![endif]-->
        
        <script type="text/javascript" src="/js/jquery-1.4.2.min.js"></script>
        <script type="text/javascript" src="/js/jquery-ui-1.8.custom.min.js"></script>
        <script type="text/javascript" src="/js/jquery.Storage.js"></script>
        <script type="text/javascript" src="/js/json2.js"></script>
        {% if not is_user_admin %}
        <script type="text/javascript" src="/js/non_admins.js"></script>
        {% endif %}
        
        <script type="text/javascript">
        // plain js
        function filterResults() {
            var form = document.getElementById('filterForm');
            if( form ) {
                form.submit()
            }
        }
        </script>
        
        <script type="text/javascript"> <!-- GOOGLE ANALYTICS TRACKING code  -->
        var _gaq = _gaq || [];
        _gaq.push(['_setAccount', 'UA-16018926-3']);
        _gaq.push(['_trackPageview']);
        
        (function() {
          var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
          ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
          var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
        })();
        </script>
    </head>
    <body>
        {% if is_user_admin %}
            {% include 'admin_header.html' %}
        {% else %}
        
        <div id="main">
                <div class="top-allwebs"><a href="http://www.pavimentosarquiservi.com " target="_blank" ><img src="/pix/top-todas-las-webs.jpg" alt="Tarima Flotante y Parquet a Precios de Oferta"/></a></div>
                <div class="top"><img src="/pix/layout/cabecera-outlet-tarimas.jpg" alt="Tarima Flotante y Parquet a Precios de Oferta"/></div>
    <div id="content">
        <h1>Tarima Flotante Laminada y Madera Natural</h1>
    <div class="home-text">
        
        <p><strong class="biger">OUTLETdeTARIMAS.es</strong> te permite acceder a <b>suelos de tarima laminada y de madera natural</b> de primeras marcas con grandes descuentos.</p>
        <p><strong class="biger">¡Aprovecha!</strong> <b>Todos las tarimas</b> cuentan con <b>garantía oficial</b> de su marca original y puedes solicitar <b>envío e instalación en toda España</b>.</p>
    </div>
    <div class="banner-marcas"><img src="pix/layout/outlet.jpg" alt="Tarima Flotante y Parquet Quickstep Parador Pergo Witex Meister Dumafloor Karelia Floorline Faus Egger Grundorf Meitt Berryfloor Balterio Aquastep Avatara Kronoswiss Terhurne"/></div>
    <div class="lead"></div>
    
                <!-- table>
                    <tr>
                        <td>
                        
                        </td>
                        <td class="padding-top-logos">
                            <div id="home-logos">
                                <img src="/pix/brands/bn/quick-step.gif" alt="quick-step"/>
                                <img src="/pix/brands/bn/pergo.gif" alt="pergo"/>
                                <img src="/pix/brands/bn/balterio.gif" alt="balterio"/>
                                <img src="/pix/brands/bn/berryfloor.gif" alt="berryfloor"/>
                                <img src="/pix/brands/bn/karelia.gif" alt="karelia"/>
                                <img src="/pix/brands/bn/parador.gif" alt="parador"/>
                                <img src="/pix/brands/bn/grundorf.gif" alt="grundorf"/>
                                <img src="/pix/brands/bn/fiberon.gif" alt="fiberon"/>
                                <img src="/pix/brands/bn/floorline.gif" alt="floorline"/>
                                <img src="/pix/brands/bn/witex.gif" alt="witex"/>
                                <img src="/pix/brands/bn/kaldia.gif" alt="kaldia"/>
                                <img src="/pix/brands/bn/egger.gif" alt="egger"/>
                                <img src="/pix/brands/bn/meister.gif" alt="meister"/>
                                <img src="/pix/brands/bn/lemnos.gif" alt="lemnos"/>
                                <img src="/pix/brands/bn/tarkett.gif" alt="tarkett"/>
                                <img class="center" src="/pix/brands/bn/kronoswiss.gif" alt="kronoswiss"/>
                            </div>
                        </td>
                    </tr>
                </table -->
    </div>
        
        
        {% endif %}
        
        {% if is_user_admin %}
        <div id="tool-box">
            <div id="tool-section-box">
                <div class="box-title">Nuevo &rarr;</div>
                <form name="newprod" method="post" action="{{path}}" enctype="multipart/form-data">
                    <div id="form-table">
                        <div class="row">
                            <label for="dealer">Distribuidor</label>
                            <select name="dealer" id="dealer">
                                <option value=""> - </option>
                                {% for d in entry_form_dealer_list %}
                                    <option value="{{d.key}}" id="{{d.key}}">{{d.name|capfirst}}</option>
                                {% endfor %}
                            </select>
                            <label for="brand">Marca</label> 
                            <select name="brand" id="brand">
                                <option value=""> - </option>
                                {% for b in entry_form_brand_list %}
                                <option value="{{b.key}}" id="{{b.key}}">{{b.name|capfirst}}</option>
                                {% endfor %}
                            </select>
                        </div><!-- row -->
                        <div class="row">
                            <label for="name">Producto</label> 
                            <input type="text" class="text long" name="name" />
                            <label for="composition">Tipo</label> 
                            <select name="composition" id="composition">
                                <option value=""> - </option>
                                {% for c in entry_form_comp_list %}
                                <option value="{{c.key}}" id="{{c.key}}">{{c.name|capfirst}}</option>
                                {% endfor %}
                            </select>
                            <label for="wood">Madera</label> 
                            <select name="wood" id="wood">
                                <option value=""> - </option>
                                {% for w in entry_form_wood_list %}
                                <option value="{{w.key}}" id="{{w.key}}">{{w.name|capfirst}}</option>
                                {% endfor %}
                            </select>
                            <label for="resistance">Resist./Grosor</label> 
                            <select name="resistance" id="resistance">
                                <option value=""> - </option>
                                {% for r in entry_form_resistance_list %}
                                <option value="{{r.key}}" id="{{r.key}}">{{r.name|capfirst}}</option>
                                {% endfor %}
                            </select>
                        </div><!-- row -->
                        <div class="row">
                            <label for="quantity">Disponibilidad (m&sup2;)</label> <input type="text" class="text short" name="quantity" size="5" />
                            <label for="price">Precio (€/m&sup2;)</label> <input type="text" class="text short" name="price" size="5" />
                            <label for="pic">Foto</label> <input type="file" class="file" name="pic" />
                        </div><!-- row -->
                        <div class="row">
                            <input type="submit" value=" Guardar " />
                        </div><!-- row -->
                    </div><!-- form-table div -->
                </form>
            </div><!-- tool-section box -->
            
            <div id="search-box">
                <div class="box-title">Buscar &rarr;</div>
                <div id="form-table">
                <form name="search" method="get" action="{{path}}">
                    <input type="text" name="code" value="{{searched_code}}" />
                    <select name="search_type" disabled="disabled">
                        <option name='code'>Código</option>
                    </select>
                    <input type="submit" value="Buscar">
                    {% if searched_code %}<a href="{{path}}" class="clear-x" style="margin-left:10px;">X</a>{% endif %}
                </form>
                </div>
            </div><!-- search-box -->
        </div><!-- toolbox -->
        {% endif %}
        
        <form name="filter" id="filterForm" method="get" action="{{path}}">
        <div id="filter-box" {% if is_filter_active %}style="background-color:#FFFF66;"{% endif %}>
            <div id="filter-price-max-box">
                <select name="filter-price-max" id="price-max" style="width:120px; margin-top:5px;" onChange="filterResults()">
                    <option value="">Precio</option>
                    {% for step in price_thresholds %}
                    <option value="{{step}}" {% ifequal step filter_price_max %}selected="selected"{% endifequal %}>Hasta {{step}} &euro;</option>
                    {% endfor %}
                    <option value="">Todos los precios</option>
                </select>
            </div>
            
            <div id="filter-brand-box">
                <select name="filter-brand" id="filter-brand" style="width:120px; margin-top:5px;" onChange="filterResults()">
                    <option value="all">Marca</option>
                    {% for b in filter_brand_list %}
                    <option value="{{b.key}}" {% ifequal filter_brand_selected b.name %}selected="selected"{% endifequal %}>
                        {{b.name|capfirst}}</option>
                    {% endfor %}
                    <option value="None" {% ifequal filter_brand_selected 'Sin Marca' %}selected="selected"{% endifequal %}>Sin marca</option>
                    <option value="all">Todas las marcas</option>
                </select>
            </div>
            
            <div id="filter-wood-box">
                <select name="filter-wood" id="filter-wood" style="width:120px; margin-top:5px;" onChange="filterResults()">
                    <option value="all">Madera</option>
                    {% for w in filter_wood_list %}
                    <option value="{{w.key}}" {% ifequal filter_wood_selected w.name %}selected="selected"{% endifequal %}>{{w.name|capfirst}}</option>
                    {% endfor %}
                    <option value="all">Todas las maderas</option>
                </select>
            </div>
            
            {% if show_compositions_filter %}
            <div id="filter-comp-box">
                <select name="filter-comp" id="filter-comp" style="width:120px; margin-top:5px;" onChange="filterResults()">
                    <option value="all">Tipo de tarima</option>
                    {% for c in comp_list %}
                    <option value="{{c.name}}" {% ifequal filter_comp_selected c.name %}selected="selected"{% endifequal %}>{{c.name|capfirst}}</option>
                    {% endfor %}
                    <option value="all">Tipo</option>
                </select>
            </div>
            {% endif %}
            
            {% if is_filter_active %}
            <div id="filter-buttons">
                <a href="{{path}}">Ver ofertas sin filtrar</a>
            </div>
            {% else %}
            <div id="filter-status">
                Viendo listado completo
            </div>
            {% endif %}
        </div><!-- filter-box -->
        </form>
        
        {% if prods %}
        <table id="prod-list" cellpadding="0" cellspacing="0">
            {% for p in prods %}
            <tr id="prod-{{p.key.id}}">
                <td class="foto-td">
                    {% if p.pic %}
                    <img src="/img/{{p.key}}" />
                    {% else %}
                    <img src="/pix/no-foto.png" />
                    {% endif %}
                </td>
                <td class="prod-info-td">
                    {% if p.brand.logo_file_name %}
                    <img class="prod-brand-logo" src="/pix/brands/{{p.brand.logo_file_name}}.png" />
                    {% endif %}
                    <div class="prod-title">{{p.name|capfirst}}</div>
                    <div class="prod-info">
                         Tarima {{p.composition.name|capfirst}} {% if p.resistance %}({{p.resistance.name}}){% endif %} ·
                         {{p.wood.name|capfirst}} ·
                         {{p.quantity|floatformat:2}} m&sup2; disponibles <br>
                         Código: <span class="prod-code">&nbsp;{{p.code}}&nbsp;</span>
                    </div>
                </td>
                <td class="prod-price-td">
                    <div class="prod-price-box"><span class="prod-price-tag">{{p.price|floatformat:2}}</span> €/m<sup>2</sup></div>
                </td>
                {% if is_user_admin %}
                <td class="prod-tools-td">
                    <a class="prod-delete" href="/adm/delete/{{p.key}}" onClick="return confirm('¿Seguro?') ? true : false;"><img src="/pix/trash-can.jpg"></a>
                    <a class="prod-modify" href="/adm/modify/{{p.key.id}}"><img src="/pix/pencil.jpg"></a>
                </td>
                {% endif %}
            </tr>
            {% if not is_user_admin %}
            <tr id="drawer-{{p.key.id}}" style="display: none;">
                <td colspan="4" class="drawer">
                    <div class="msg" id="msg-{{p.key.id}}">Envíanos tus datos y nos ponemos en contacto contigo para informarte sobre esta oferta única.</div>
                    <form name="formy" id="form-{{p.key.id}}" action="/rpc">
                        <input type="hidden" name="code" value="{{p.code}}">
                        Nombre: <input type="text" name="nombre" value="" class="ojete">
                        Email: <input type="text" name="email" value="">
                        Teléfono: <input type="text" name="telefono" value="">
                        <input type="button" value="Enviar" id="button-{{p.key.id}}">
                    </form>
                </td>
            </tr>
            {% endif %}
            {% endfor %}
        </table>
        {% else %}
        <div id="no-results">
            {% if is_filter_active %}
            ¡Oh! ...no hemos encontrado este producto.
            <br>Si estaba en <strong>OUTLETdeTARIMAS.es </strong>¡Se ha vendido!<br>
            <b>Llámanos 91 637 2439</b> ó <b>902 014 106</b> encuentra lo que buscas hoy!.
            <div class="button-link"><a href="{{path}}">Ver lista completa</a> &raquo;</div>
            {% else %}
            ¡Oh! ...no hemos encontrado este producto.
            <br>Si estaba en <strong>OUTLETdeTARIMAS.es </strong>¡Se ha vendido!<br>
            <b>Llámanos 91 637 2439</b> ó <b>902 014 106</b> encuentra lo que buscas hoy!.
            {% endif %}
        </div>
        {% endif %}
        {% if prev_page_href or next_page_href %}
        <div id="pagination-box">
            {% if prev_page_href %}<a class="pagination-link" href="{{prev_page_href}}">&larr; Volver</a>{% endif %}
            {% if prev_page_href and next_page_href %}&nbsp; · &nbsp;{% endif %}
            {% if next_page_href %}<a class="pagination-link" href="{{next_page_href}}">Siguiente &rarr;</a>{% endif %}
        </div>
        {% endif %}
        <div class="footer"><a href="http://www.pavimentosarquiservi.com " target="_blank" ><img src="/pix/footer-2.jpg" /></a></div>
        <div class="footer"><a href="http://www.pavimentosarquiservi.com " target="_blank" ><img src="/pix/footer.jpg" /></a></div>
        </div> <!-- cierre de div main -->     
       
    </body>
</html>
